import {Session} from '/@/utils/storage';
export const tableOption={
    labelPosition: 'right',
    labelSuffix: ':',
    labelWidth: 120,
    gutter: 0,
    menuBtn: true,
    submitBtn: true,
    submitText: '提交',
    emptyBtn: true,
    emptyText: '清空',
    menuPosition: 'center',
    border: true,
    index: true,
    indexLabel: '序号',
    indexWidth: 60,
    stripe: true,
    menuAlign: 'center',
    align: 'center',
    searchMenuSpan: 4,
    addBtn: false,
    editBtn: true,
    delBtn: true,
    // rowKey: 'subareaCode',
    // rowParentKey: 'subareadCode',
    menuWidth: 380,
    selection:true,
    searchMenuPosition: 'left',
    searchLabelWidth: 'auto',
    column: [
        {
          type: 'input',
          label: '建筑空间ID',
          prop: 'subareaId',
          addDisplay: false,
          editDisabled: true,
          display: false,
          hide: true,
        },
        {
          type: 'select',
          label: '分区所属建筑',
          prop: 'subareaJzbm',
          addDisplay: true,
          title: '选择字段',
          formslot: true,
          slot: true,
          hide: true,
          search:true,
          // searchLabelWidth: 120,
          searchType:'select',  
          searchOrder:3,
          rules:[{
            required: true,
            message: '分区所属建筑必须填写',
            trigger: 'blur'
          }],
          disabled:false
        },
        {
          type: 'select',
          label: '分区所属楼层',
          prop: 'subareaLc',
          addDisplay: true,
          title: '选择字段',
          formslot: true,
          slot: true,
          hide: true,
          search:true,
          searchType:'select',  
          searchOrder:2,
          rules:[{
            required: true,
            message: '分区所属楼层必须填写',
            trigger: 'blur'
          }],
          disabled:false
        },
        {
          type: 'input',
          label: '分区所属建筑',
          prop: 'buildingsName',
          overHidden: true,
          addDisplay: false,
          editDisplay:false
        },
        {
          type: 'input',
          label: '分区所属楼层',
          prop: 'floorName',
          addDisplay: false,
          editDisplay:false
        },
        {
          type: 'input',
          label: '分区名称',
          prop: 'subareaCn',
          addDisplay: true,
          rules:[{
            required: true,
            message: '分区名称必须填写',
            trigger: 'blur'
          }],
          search:true,
          // searchLabelWidth: 110,
          searchOrder:1,
          overHidden:true
        },
        {
          type: 'input',
          label: '分区英文名',
          prop: 'subareaEn',
          addDisplay: true,
        },

        {
          type: 'input',
          label: '分区编码',
          prop: 'subareaCode',
          addDisplay: true,
          disabled:true,
          overHidden:true
        },

        {
          type: 'select',
          label: '父级分区',
          prop: 'subareadCode',
          //addDisplay: true,
          filterable: true,
          hide: true,
          disabled:false,
          display: false,
        },
        {
          type: 'number',
          label: '排序',
          prop: 'sort',
          addDisplay: true,
          rules: [{
            required: true,
            message: '请输入排序',
            trigger: 'blur'
          }],
          value: 1,
          hide: true,
        },
        {
          type: 'textarea',
          label: '分区轮廓',
          prop: 'subareaCoords',
          addDisplay: true,
          span:24,
          hide:true
        },
        // {
        //   type: 'textarea',
        //   label: '分区面积',
        //   prop: 'subareaArea',
        //   // addDisplay: true,
        //   // span:24,
        //   // hide:true
        // },
        {
          // type: 'input',
          label: '分区面积',
          prop: 'subareaArea',
          addDisplay: false,
          editDisabled: true,
          overHidden: true
        },
        {
          type: 'textarea',
          label: '分区描述',
          prop: 'remark',
          addDisplay: true,
          span:24,
          overHidden:true
        }
      ]
}
export const tableOption2={
  labelPosition: 'right',
  labelSuffix: ':',
  labelWidth: 120,
  gutter: 0,
  menuBtn: true,
  submitBtn: true,
  submitText: '提交',
  emptyBtn: true,
  emptyText: '清空',
  menuPosition: 'center',
  border: true,
  index: true,
  indexLabel: '序号',
  indexWidth: 60,
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 4,
  addBtn: true,
  editBtn: true,
  delBtn: true,
  selection:true,
  searchMenuPosition: 'left',
  searchLabelWidth: 'auto',
  column: [
      {
        type: 'input',
        label: '建筑空间ID',
        prop: 'subareaId',
        addDisplay: false,
        editDisabled: true,
        display: false,
        hide: true,
      },
      {
        type: 'select',
        label: '分区所属建筑',
        prop: 'subareaJzbm',
        addDisplay: true,
        title: '选择字段',
        formslot: true,
        slot: true,
        hide: true,
        search:false,
        searchLabelWidth: 120,
        dicUrl:'/api/admin/accessBuildings/getBuildingsBy',
        dicMethod:'post',
        props:{
          label: 'buildingsCn',
          value: 'buildingsId'
        },
        dicHeaders: {
          authorization: 'Bearer ' + Session.get('token')
        },
        searchType:'select',  
        searchOrder:3,
        rules:[{
          required: true,
          message: '分区所属建筑必须填写',
          trigger: 'blur'
        }],
        disabled:true
      },
      {
        type: 'select',
        label: '分区所属楼层',
        prop: 'subareaLc',
        addDisplay: true,
        title: '选择字段',
        formslot: true,
        slot: true,
        hide: true,
        search:false,
        searchLabelWidth: 120,
        dicUrl:'/api/admin/accessFloor/getBamFloorBy',
        dicMethod:'post',
        dicHeaders: {
          authorization: 'Bearer ' + Session.get('token')
        },
        props:{
          label: 'floorCn',
          value: 'floorCode'
        },
        searchType:'select',  
        searchOrder:2,
        rules:[{
          required: true,
          message: '分区所属楼层必须填写',
          trigger: 'blur'
        }],
        disabled:true
      },
      {
        type: 'input',
        label: '分区所属建筑',
        prop: 'buildingsName',
        addDisplay: false,
        editDisplay:false
      },
      {
        type: 'input',
        label: '分区所属楼层',
        prop: 'floorName',
        addDisplay: false,
        editDisplay:false
      },
      {
        type: 'input',
        label: '分区名称',
        prop: 'subareaCn',
        addDisplay: true,
        rules:[{
          required: true,
          message: '分区名称必须填写',
          trigger: 'blur'
        }],
        search:true,
        // searchLabelWidth: 110,
        searchOrder:1,
        overHidden:true
      },
      {
        type: 'input',
        label: '分区英文名',
        prop: 'subareaEn',
        addDisplay: true,
      },

      {
        type: 'input',
        label: '分区编码',
        prop: 'subareaCode',
        addDisplay: true,
        disabled:true,
        overHidden:true
      },
      {
        type: 'select',
        label: '父级分区',
        prop: 'subareadCode',
        addDisplay: false,
        filterable: true,
        props: {
          label: 'subareaCn',
          value: 'subareaCode'
        },
        dicUrl:'/bm/bamssubarea/getBamSSubareaBy',
        dicMethod:'post',
        hide: true,
        disabled:true
      },
      {
        type: 'number',
        label: '排序',
        prop: 'sort',
        addDisplay: true,
        rules: [{
          required: true,
          message: '请输入排序',
          trigger: 'blur'
        }],
        value: 1,
        hide:true,
      },
      {
        type: 'textarea',
        label: '分区轮廓',
        prop: 'subareaCoords',
        addDisplay: true,
        span:24,
        hide:true
      },
      {
        type: 'textarea',
        label: '分区描述',
        prop: 'remark',
        addDisplay: true,
        span:24,
        overHidden:true
      },

      
      
    ],
}